<?php $res = ORM::factory('userresource')->where('user_id', '=', SESSION::instance()->get('user_id'))->find_all(); ?>
<center>
    <table border="1">
        <tr>
            <th>Wood</th>
            <th>Food</th>
            <th>Stone</th>
            <th>Gold</th>
            <th>Premium</th>
        </tr>
        <tr>
            <td id="wood" title="max: 5000"><?php echo round(ORM::factory('userresource')->where('user_id', '=', SESSION::instance()->get('user_id'))->where('town_id', '=', SESSION::instance()->get('town_id'))->where('product_id', '=', 1)->find()->quantity) ?></td>
            <td id="food" title="max: 5000"><?php echo round(ORM::factory('userresource')->where('user_id', '=', SESSION::instance()->get('user_id'))->where('town_id', '=', SESSION::instance()->get('town_id'))->where('product_id', '=', 2)->find()->quantity) ?></td>
            <td id="stone" title="max: 5000"><?php echo round(ORM::factory('userresource')->where('user_id', '=', SESSION::instance()->get('user_id'))->where('town_id', '=', SESSION::instance()->get('town_id'))->where('product_id', '=', 3)->find()->quantity) ?></td>
            <td id="gold" title="max: 5000"><?php echo round(ORM::factory('userresource')->where('user_id', '=', SESSION::instance()->get('user_id'))->where('town_id', '=', SESSION::instance()->get('town_id'))->where('product_id', '=', 4)->find()->quantity) ?></td>
            <td id="premium"></td>
        </tr>
    </table>
</center>
